package com.wyl.template.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 日志类型
 */

public enum LoggerType {
    SELECT(0, "查询"),
    ADD(1, "添加"),
    DELETE(2, "删除"),
    UPDATE(3, "修改"),
    IMPORT(4, "导入"),
    EXPORT(5, "导出"),
    SAVE(6, "添加或修改"),
    ;

    private Integer code;
    private String desc;

    private LoggerType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return this.code;
    }

    @JsonValue
    public String getDesc() {
        return this.desc;
    }

    @Override
    public String toString() {
        return this.desc;
    }

}
